﻿namespace QuickMail
{
    using System.Diagnostics;
    using System.IO;
    using System.Windows;
    using System.Windows.Controls;

    partial class ResourceDictionary
    {
        private void FileOpen_OnClick(object sender, RoutedEventArgs e)
        {
            if (sender == null || ((Button)sender).CommandParameter == null)
                return;

            string filePath = ((Button)sender).CommandParameter.ToString();
            if (File.Exists(filePath))
                Process.Start(filePath);
        }
    }
}
